package com.qf.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author sunyamei
 * @version V1.0
 * @Project springmvc_Demo
 * @Package com.qf.pojo
 * @Description:
 * @Date 2022/7/13 21:03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @JsonProperty("name")
    private String username;
    @JsonIgnore//隐藏密码
    private String password;
    //@JsonInclude(JsonInclude.Include.NON_NULL)//不显示昵称
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String nickname;
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
    private Date birthday;
    @JsonSerialize(using = MyJsonSerializer.class)
    private  double money;
}
